import os,django

from celery import Celery

# Set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fuguang06.settings.dev')
django.setup()

app = Celery('fuguang')

# Using a string here means the worker doesn't have to serialize
# the configuration object to child processes.
# - namespace='CELERY' means all celery-related configuration keys
#   should have a `CELERY_` prefix.
# 加载配置文件，表示当前应用celery应用，加载指定路径的settings
app.config_from_object('mycerlery.settings', namespace='fuguang')

# Load task modules from all registered Django apps.
# 加载任务
app.autodiscover_tasks(['mycerlery.sms'])